import request from '@/utils/request'

export function orderCountAPI(data) { // 获取请求时间范围之内的订单总数
  return request({
    url: '/order-service/report/orderCount/',
    method: 'GET',
    params: {
      start: data.start,
      end: data.end
    }
  })
}

export function orderAmountAPI(data) { // 获取请求时间范围之内的总收入
  return request({
    url: '/order-service/report/orderAmount/',
    method: 'GET',
    params: {
      start: data.start,
      end: data.end
    }
  })
}

export function orderTotalBillAPI(data) { // 获取请求时间范围之内的分成总数
  return request({
    url: '/order-service/report/totalBill/',
    method: 'GET',
    params: {
      start: data.start,
      end: data.end
    }
  })
}

export function PartnerSearchAPI(params) { // 获取合作商
  return request({
    url: '/user-service/partner/search',
    method: 'GET',
    params
  })
}

export function partnerCollectAPI(params) { // 获取一定日期范围之内的合作商分成汇总数据
  // console.log(qs.stringify(params))
  return request({
    url: 'order-service/report/partnerCollect',
    method: 'GET',
    params
  })
}

